Imports System.Net
Imports System.Net.Sockets
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim httpReq As System.Net.HttpWebRequest

        Try
            Dim httpURL As New System.Uri(TextBox3.Text)

            httpReq = CType(WebRequest.Create(httpURL), HttpWebRequest)

            If httpReq.TransferEncoding <> Nothing Then
                TextBox1.Text = httpReq.TransferEncoding.ToString
            Else
                TextBox1.Text = "null"
            End If

            If httpReq.UserAgent <> Nothing Then
                TextBox2.Text = httpReq.UserAgent.ToString
            Else
                TextBox2.Text = "null"
            End If

        Catch ex As Exception
            Label3.Text = ex.StackTrace.ToString()
        End Try
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        End
    End Sub
End Class
